<template>
  <el-dialog :visible.sync="visible" title="物流信息" width="800" @close="QualityDialogClose">
    <el-timeline>
      <el-timeline-item
        v-for="(activity, index) in wuliuData2"
        :key="index"
        :timestamp="activity.timestamp"
      >{{ activity.content }}</el-timeline-item>
    </el-timeline>
    <span slot="footer" class="dialog-footer">
      <el-button @click="QualityDialogClose">确 定</el-button>
      <!-- <el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button> -->
    </span>
  </el-dialog>
</template>
<script>
export default {
  props: {
    quality: {
      type: Boolean,
      default: false
    },
    wuliuData: {
      type: Object,
      default: null
    }
  },
  data() {
    return {
      visible: this.quality,
      wuliuData2: this.wuliuData
    }
  },
  watch: {
    quality() {
      this.visible = this.quality
    },
    wuliuData() {
      console.log(this.wuliuData)
      this.wuliuData2 = this.wuliuData
    }
  },
  methods: {
    QualityDialogClose() {
      this.$emit('update:quality', false)
    }
  }
}
</script>
